package com.jalarbee.core.business;

import com.jalarbee.core.money.MonetaryAmount;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.Columns;
import org.hibernate.annotations.Type;

/**
 *
 * @author Abdoulaye <b>Ikhnaton</b> Diallo
 */
@MappedSuperclass
public abstract class PricedEntity {

    @Type(type = "com.jalarbee.core.money.MonetaryAmountType")
    @Columns(columns = {
        @Column(name = "s_currency"),
        @Column(name = "s_amount")})
    protected  MonetaryAmount stockPrice;
    @Type(type = "com.jalarbee.core.money.MonetaryAmountType")
    @Columns(columns = {
        @Column(name = "r_currency"),
        @Column(name = "r_amount")})
    protected MonetaryAmount retailPrice;
    @Type(type = "com.jalarbee.core.money.MonetaryAmountType")
    @Columns(columns = {
        @Column(name = "c_currency"),
        @Column(name = "c_amount")})
    protected MonetaryAmount creditPrice;

    public MonetaryAmount getStockPrice() {
        return stockPrice;
    }

    public void setStockPrice(MonetaryAmount stockPrice) {
        this.stockPrice = stockPrice;
    }

    public MonetaryAmount getRetailPrice() {
        return retailPrice;
    }

    public void setRetailPrice(MonetaryAmount retailPrice) {
        this.retailPrice = retailPrice;
    }

    public MonetaryAmount getCreditPrice() {
        return creditPrice;
    }

    public void setCreditPrice(MonetaryAmount creditPrice) {
        this.creditPrice = creditPrice;
    }
}
